

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/fluid.png">
  <link rel="icon" href="/img/favicon.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="xuehaoweng">
  <meta name="keywords" content="">
  
    <meta name="description" content="在当今快速发展的企业通讯领域，企业微信已成为众多企业内部沟通的重要工具。为了满足不同场景下的沟通需求，企业微信应用支持多种消息类型，包括应用支持推送文本、图片、视频、文件、图文等类型。本文将详细介绍如何利用企业微信的 API 接口，实现各类消息的高效推送，助力企业沟通更加顺畅。企业微信开放了消息发送接口，企业可以使用这些接口让自定义应用与企业微信后台或用户间进行双向通信。   企业微信开发者中心">
<meta property="og:type" content="article">
<meta property="og:title" content="企业微信消息推送全攻略-从文本到多媒体，一文读懂高效沟通秘诀">
<meta property="og:url" content="http://blog.xhweng.cn/2024/04/10/%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%B6%88%E6%81%AF%E6%8E%A8%E9%80%81%E5%85%A8%E6%94%BB%E7%95%A5%EF%BC%9A%E4%BB%8E%E6%96%87%E6%9C%AC%E5%88%B0%E5%A4%9A%E5%AA%92%E4%BD%93%EF%BC%8C%E4%B8%80%E6%96%87%E8%AF%BB%E6%87%82%E9%AB%98%E6%95%88%E6%B2%9F%E9%80%9A%E7%A7%98%E8%AF%80/index.html">
<meta property="og:site_name" content="有追求的开发者">
<meta property="og:description" content="在当今快速发展的企业通讯领域，企业微信已成为众多企业内部沟通的重要工具。为了满足不同场景下的沟通需求，企业微信应用支持多种消息类型，包括应用支持推送文本、图片、视频、文件、图文等类型。本文将详细介绍如何利用企业微信的 API 接口，实现各类消息的高效推送，助力企业沟通更加顺畅。企业微信开放了消息发送接口，企业可以使用这些接口让自定义应用与企业微信后台或用户间进行双向通信。   企业微信开发者中心">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/8d3814ebbf21e2e3ab074643aa80c63a.jpeg">
<meta property="article:published_time" content="2024-04-10T06:50:57.000Z">
<meta property="article:modified_time" content="2024-06-11T01:21:41.149Z">
<meta property="article:author" content="xuehaoweng">
<meta property="article:tag" content="工具">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/8d3814ebbf21e2e3ab074643aa80c63a.jpeg">
  
  
    <meta name="referrer" content="no-referrer-when-downgrade">
  
  
  <title>企业微信消息推送全攻略-从文本到多媒体，一文读懂高效沟通秘诀 - 有追求的开发者</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"blog.xhweng.cn","root":"/","version":"1.9.7","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"follow_dnt":true,"baidu":"b3bbb822b3d2a5e2761107c03cf72b8c","google":{"measurement_id":null},"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml","include_content_in_search":true};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  

  
    <!-- Baidu Analytics -->
    <script async>
      if (!Fluid.ctx.dnt) {
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?b3bbb822b3d2a5e2761107c03cf72b8c";
          var s = document.getElementsByTagName("script")[0];
          s.parentNode.insertBefore(hm, s);
        })();
      }
    </script>
  

  
    <!-- Google tag (gtag.js) -->
    <script async>
      if (!Fluid.ctx.dnt) {
        Fluid.utils.createScript("https://www.googletagmanager.com/gtag/js?id=", function() {
          window.dataLayer = window.dataLayer || [];
          function gtag() {
            dataLayer.push(arguments);
          }
          gtag('js', new Date());
          gtag('config', '');
        });
      }
    </script>
  

  

  

  

  



  
<meta name="generator" content="Hexo 7.0.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>有追求的开发者</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/" target="_self">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/" target="_self">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/" target="_self">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/" target="_self">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/" target="_self">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/bg/big.jpg') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="企业微信消息推送全攻略-从文本到多媒体，一文读懂高效沟通秘诀"></span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2024-04-10 14:50" pubdate>
          2024年4月10日 下午
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          1.7k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          14 分钟
        
      </span>
    

    
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <h1 id="seo-header">企业微信消息推送全攻略-从文本到多媒体，一文读懂高效沟通秘诀</h1>
            
            
              <div class="markdown-body">
                
                <blockquote>
<p>在当今快速发展的企业通讯领域，企业微信已成为众多企业内部沟通的重要工具。为了满足不同场景下的沟通需求，企业微信应用支持多种消息类型，包括应用支持推送文本、图片、视频、文件、图文等类型。本文将详细介绍如何利用企业微信的 API 接口，实现各类消息的高效推送，助力企业沟通更加顺畅。企业微信开放了消息发送接口，企业可以使用这些接口让自定义应用与企业微信后台或用户间进行双向通信。</p>
</blockquote>
<p><img src="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/8d3814ebbf21e2e3ab074643aa80c63a.jpeg" srcset="/img/loading.gif" lazyload alt="企业微信"></p>
<p><a target="_blank" rel="noopener" href="https://developer.work.weixin.qq.com/document/path/90372">企业微信开发者中心</a><a target="_blank" rel="noopener" href="https://developer.work.weixin.qq.com/document/path/90372">https://developer.work.weixin.qq.com/document/path/90372</a></p>
<h1 id="接口定义"><a href="#接口定义" class="headerlink" title="接口定义"></a>接口定义</h1><p>应用支持推送文本、图片、视频、文件、图文等类型。</p>
<p>请求方式：POST（HTTPS）</p>
<p>请求地址： <a target="_blank" rel="noopener" href="https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=ACCESS_TOKEN">https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=ACCESS_TOKEN</a></p>
<h1 id="消息类型"><a href="#消息类型" class="headerlink" title="消息类型"></a>消息类型</h1><h2 id="文本消息"><a href="#文本消息" class="headerlink" title="文本消息"></a>文本消息</h2><p><strong>请求示例：</strong></p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs swift">&#123;<br>   <span class="hljs-string">&quot;touser&quot;</span> : <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span>,<br>   <span class="hljs-string">&quot;toparty&quot;</span> : <span class="hljs-string">&quot;PartyID1|PartyID2&quot;</span>,<br>   <span class="hljs-string">&quot;totag&quot;</span> : <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span>,<br>   <span class="hljs-string">&quot;msgtype&quot;</span> : <span class="hljs-string">&quot;text&quot;</span>,<br>   <span class="hljs-string">&quot;agentid&quot;</span> : <span class="hljs-number">1</span>,<br>   <span class="hljs-string">&quot;text&quot;</span> : &#123;<br>       <span class="hljs-string">&quot;content&quot;</span> : <span class="hljs-string">&quot;你的快递已到，请携带工卡前往邮件中心领取。<span class="hljs-subst">\n</span>出发前可查看&lt;a href=<span class="hljs-subst">\&quot;</span>http://work.weixin.qq.com<span class="hljs-subst">\&quot;</span>&gt;邮件中心视频实况&lt;/a&gt;，聪明避开排队。&quot;</span><br>   &#125;,<br>   <span class="hljs-string">&quot;safe&quot;</span>:<span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;enable_id_trans&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;enable_duplicate_check&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;duplicate_check_interval&quot;</span>: <span class="hljs-number">1800</span><br>&#125;<br></code></pre></td></tr></table></figure>

<p><strong>文本消息展现：</strong><br><img src="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/20240410143317.png" srcset="/img/loading.gif" lazyload alt="image"></p>
<p><strong>特殊说明：</strong><br>其中 text 参数的 content 字段可以支持换行、以及 A 标签，即可打开自定义的网页（可参考以上示例代码）(注意：换行符请用转义过的\n)</p>
<h2 id="图片消息"><a href="#图片消息" class="headerlink" title="图片消息"></a>图片消息</h2><p><strong>请求示例：</strong></p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-punctuation">&#123;</span><br>   <span class="hljs-attr">&quot;touser&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;toparty&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;PartyID1|PartyID2&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;totag&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;msgtype&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;image&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;agentid&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-number">1</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;image&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;media_id&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;MEDIA_ID&quot;</span><br>   <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;safe&quot;</span><span class="hljs-punctuation">:</span><span class="hljs-number">0</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;enable_duplicate_check&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;duplicate_check_interval&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">1800</span><br><span class="hljs-punctuation">&#125;</span><br></code></pre></td></tr></table></figure>

<p><strong>media_id，可以调用上传临时素材接口获取</strong></p>
<h2 id="语音消息"><a href="#语音消息" class="headerlink" title="语音消息"></a>语音消息</h2><p><strong>请求示例：</strong></p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-punctuation">&#123;</span><br>   <span class="hljs-attr">&quot;touser&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;toparty&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;PartyID1|PartyID2&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;totag&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;msgtype&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;voice&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;agentid&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-number">1</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;voice&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;media_id&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;MEDIA_ID&quot;</span><br>   <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;enable_duplicate_check&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;duplicate_check_interval&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">1800</span><br><span class="hljs-punctuation">&#125;</span><br></code></pre></td></tr></table></figure>

<p><strong>media_id，可以调用上传临时素材接口获取</strong></p>
<h2 id="视频消息"><a href="#视频消息" class="headerlink" title="视频消息"></a>视频消息</h2><p><strong>请求示例：</strong></p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-punctuation">&#123;</span><br>   <span class="hljs-attr">&quot;touser&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;toparty&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;PartyID1|PartyID2&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;totag&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;msgtype&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;video&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;agentid&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-number">1</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;video&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;media_id&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;MEDIA_ID&quot;</span><span class="hljs-punctuation">,</span><br>        <span class="hljs-attr">&quot;title&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Title&quot;</span><span class="hljs-punctuation">,</span><br>       <span class="hljs-attr">&quot;description&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;Description&quot;</span><br>   <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;safe&quot;</span><span class="hljs-punctuation">:</span><span class="hljs-number">0</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;enable_duplicate_check&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;duplicate_check_interval&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">1800</span><br><span class="hljs-punctuation">&#125;</span><br></code></pre></td></tr></table></figure>

<p><strong>media_id，可以调用上传临时素材接口获取</strong></p>
<p><strong>视频消息展现：</strong><br><img src="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/20240410143642.png" srcset="/img/loading.gif" lazyload alt="视频消息展现"></p>
<h2 id="文件信息"><a href="#文件信息" class="headerlink" title="文件信息"></a>文件信息</h2><p><strong>请求示例：</strong></p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><code class="hljs json"><span class="hljs-punctuation">&#123;</span><br>   <span class="hljs-attr">&quot;touser&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;toparty&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;PartyID1|PartyID2&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;totag&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;msgtype&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;file&quot;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;agentid&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-number">1</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;file&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-punctuation">&#123;</span><br>        <span class="hljs-attr">&quot;media_id&quot;</span> <span class="hljs-punctuation">:</span> <span class="hljs-string">&quot;1Yv-zXfHjSjU-7LH-GwtYqDGS-zz6w22KmWAT5COgP7o&quot;</span><br>   <span class="hljs-punctuation">&#125;</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;safe&quot;</span><span class="hljs-punctuation">:</span><span class="hljs-number">0</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;enable_duplicate_check&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">0</span><span class="hljs-punctuation">,</span><br>   <span class="hljs-attr">&quot;duplicate_check_interval&quot;</span><span class="hljs-punctuation">:</span> <span class="hljs-number">1800</span><br><span class="hljs-punctuation">&#125;</span><br></code></pre></td></tr></table></figure>

<p><strong>media_id，可以调用上传临时素材接口获取</strong></p>
<p><strong>文件消息展现：</strong><br><img src="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/20240410143827.png" srcset="/img/loading.gif" lazyload alt="文件消息展现"></p>
<h2 id="文本卡片消息"><a href="#文本卡片消息" class="headerlink" title="文本卡片消息"></a>文本卡片消息</h2><p><strong>请求示例：</strong></p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><code class="hljs swift">&#123;<br>   <span class="hljs-string">&quot;touser&quot;</span> : <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span>,<br>   <span class="hljs-string">&quot;toparty&quot;</span> : <span class="hljs-string">&quot;PartyID1 | PartyID2&quot;</span>,<br>   <span class="hljs-string">&quot;totag&quot;</span> : <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span>,<br>   <span class="hljs-string">&quot;msgtype&quot;</span> : <span class="hljs-string">&quot;textcard&quot;</span>,<br>   <span class="hljs-string">&quot;agentid&quot;</span> : <span class="hljs-number">1</span>,<br>   <span class="hljs-string">&quot;textcard&quot;</span> : &#123;<br>            <span class="hljs-string">&quot;title&quot;</span> : <span class="hljs-string">&quot;领奖通知&quot;</span>,<br>            <span class="hljs-string">&quot;description&quot;</span> : <span class="hljs-string">&quot;&lt;div class=<span class="hljs-subst">\&quot;</span>gray<span class="hljs-subst">\&quot;</span>&gt;2016年9月26日&lt;/div&gt; &lt;div class=<span class="hljs-subst">\&quot;</span>normal<span class="hljs-subst">\&quot;</span>&gt;恭喜你抽中iPhone 7一台，领奖码：xxxx&lt;/div&gt;&lt;div class=<span class="hljs-subst">\&quot;</span>highlight<span class="hljs-subst">\&quot;</span>&gt;请于2016年10月10日前联系行政同事领取&lt;/div&gt;&quot;</span>,<br>            <span class="hljs-string">&quot;url&quot;</span> : <span class="hljs-string">&quot;URL&quot;</span>,<br>                        <span class="hljs-string">&quot;btntxt&quot;</span>:<span class="hljs-string">&quot;更多&quot;</span><br>   &#125;,<br>   <span class="hljs-string">&quot;enable_id_trans&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;enable_duplicate_check&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;duplicate_check_interval&quot;</span>: <span class="hljs-number">1800</span><br>&#125;<br></code></pre></td></tr></table></figure>

<p><strong>文本卡片消息展现：</strong><br><img src="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/20240410143944.png" srcset="/img/loading.gif" lazyload alt="文本卡片消息展现"></p>
<p><strong>特殊说明：</strong></p>
<p>卡片消息的展现形式非常灵活，支持使用 br 标签或者空格来进行换行处理，也支持使用 div 标签来使用不同的字体颜色，目前内置了 3 种文字颜色：灰色(gray)、高亮(highlight)、默认黑色(normal)，将其作为 div 标签的 class 属性即可，具体用法请参考上面的示例。</p>
<h2 id="图文消息"><a href="#图文消息" class="headerlink" title="图文消息"></a>图文消息</h2><p>请求示例：</p>
<figure class="highlight prolog"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><code class="hljs prolog">&#123;<br>   <span class="hljs-string">&quot;touser&quot;</span> : <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span>,<br>   <span class="hljs-string">&quot;toparty&quot;</span> : <span class="hljs-string">&quot;PartyID1 | PartyID2&quot;</span>,<br>   <span class="hljs-string">&quot;totag&quot;</span> : <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span>,<br>   <span class="hljs-string">&quot;msgtype&quot;</span> : <span class="hljs-string">&quot;news&quot;</span>,<br>   <span class="hljs-string">&quot;agentid&quot;</span> : <span class="hljs-number">1</span>,<br>   <span class="hljs-string">&quot;news&quot;</span> : &#123;<br>       <span class="hljs-string">&quot;articles&quot;</span> : [<br>           &#123;<br>               <span class="hljs-string">&quot;title&quot;</span> : <span class="hljs-string">&quot;中秋节礼品领取&quot;</span>,<br>               <span class="hljs-string">&quot;description&quot;</span> : <span class="hljs-string">&quot;今年中秋节公司有豪礼相送&quot;</span>,<br>               <span class="hljs-string">&quot;url&quot;</span> : <span class="hljs-string">&quot;URL&quot;</span>,<br>               <span class="hljs-string">&quot;picurl&quot;</span> : <span class="hljs-string">&quot;http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png&quot;</span>,<br>			   <span class="hljs-string">&quot;appid&quot;</span>: <span class="hljs-string">&quot;wx123123123123123&quot;</span>,<br>        	   <span class="hljs-string">&quot;pagepath&quot;</span>: <span class="hljs-string">&quot;pages/index?userid=zhangsan&amp;orderid=123123123&quot;</span><br>           &#125;<br>        ]<br>   &#125;,<br>   <span class="hljs-string">&quot;enable_id_trans&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;enable_duplicate_check&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;duplicate_check_interval&quot;</span>: <span class="hljs-number">1800</span><br>&#125;<br></code></pre></td></tr></table></figure>

<p><strong>图文消息展现：</strong><br><img src="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/20240410144126.png" srcset="/img/loading.gif" lazyload alt="图文消息展现"></p>
<h2 id="图文消息（mpnews）"><a href="#图文消息（mpnews）" class="headerlink" title="图文消息（mpnews）"></a>图文消息（mpnews）</h2><blockquote>
<p>mpnews 类型的图文消息，跟普通的图文消息一致，唯一的差异是图文内容存储在企业微信。<br>多次发送 mpnews，会被认为是不同的图文，阅读、点赞的统计会被分开计算。</p>
</blockquote>
<p><strong>请求示例：</strong></p>
<figure class="highlight prolog"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><code class="hljs prolog">&#123;<br>   <span class="hljs-string">&quot;touser&quot;</span> : <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span>,<br>   <span class="hljs-string">&quot;toparty&quot;</span> : <span class="hljs-string">&quot;PartyID1 | PartyID2&quot;</span>,<br>   <span class="hljs-string">&quot;totag&quot;</span>: <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span>,<br>   <span class="hljs-string">&quot;msgtype&quot;</span> : <span class="hljs-string">&quot;mpnews&quot;</span>,<br>   <span class="hljs-string">&quot;agentid&quot;</span> : <span class="hljs-number">1</span>,<br>   <span class="hljs-string">&quot;mpnews&quot;</span> : &#123;<br>       <span class="hljs-string">&quot;articles&quot;</span>:[<br>           &#123;<br>               <span class="hljs-string">&quot;title&quot;</span>: <span class="hljs-string">&quot;Title&quot;</span>,<br>               <span class="hljs-string">&quot;thumb_media_id&quot;</span>: <span class="hljs-string">&quot;MEDIA_ID&quot;</span>,<br>               <span class="hljs-string">&quot;author&quot;</span>: <span class="hljs-string">&quot;Author&quot;</span>,<br>               <span class="hljs-string">&quot;content_source_url&quot;</span>: <span class="hljs-string">&quot;URL&quot;</span>,<br>               <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Content&quot;</span>,<br>               <span class="hljs-string">&quot;digest&quot;</span>: <span class="hljs-string">&quot;Digest description&quot;</span><br>            &#125;<br>       ]<br>   &#125;,<br>   <span class="hljs-string">&quot;safe&quot;</span>:<span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;enable_id_trans&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;enable_duplicate_check&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;duplicate_check_interval&quot;</span>: <span class="hljs-number">1800</span><br>&#125;<br><br></code></pre></td></tr></table></figure>

<h2 id="markdown-消息"><a href="#markdown-消息" class="headerlink" title="markdown 消息"></a>markdown 消息</h2><blockquote>
<p>目前仅支持 markdown 语法的子集<br>微工作台（原企业号）不支持展示 markdown 消息</p>
</blockquote>
<p><strong>请求示例：</strong></p>
<figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><code class="hljs swift">&#123;<br>   <span class="hljs-string">&quot;touser&quot;</span> : <span class="hljs-string">&quot;UserID1|UserID2|UserID3&quot;</span>,<br>   <span class="hljs-string">&quot;toparty&quot;</span> : <span class="hljs-string">&quot;PartyID1|PartyID2&quot;</span>,<br>   <span class="hljs-string">&quot;totag&quot;</span> : <span class="hljs-string">&quot;TagID1 | TagID2&quot;</span>,<br>   <span class="hljs-string">&quot;msgtype&quot;</span>: <span class="hljs-string">&quot;markdown&quot;</span>,<br>   <span class="hljs-string">&quot;agentid&quot;</span> : <span class="hljs-number">1</span>,<br>   <span class="hljs-string">&quot;markdown&quot;</span>: &#123;<br>        <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;您的会议室已经预定，稍后会同步到`邮箱`  <span class="hljs-subst">\n</span>&gt;**事项详情**  <span class="hljs-subst">\n</span>&gt;事　项：&lt;font color=<span class="hljs-subst">\&quot;</span>info<span class="hljs-subst">\&quot;</span>&gt;开会&lt;/font&gt;  <span class="hljs-subst">\n</span>&gt;组织者：@miglioguan  <span class="hljs-subst">\n</span>&gt;参与者：@miglioguan、@kunliu、@jamdeezhou、@kanexiong、@kisonwang  <span class="hljs-subst">\n</span>&gt;  <span class="hljs-subst">\n</span>&gt;会议室：&lt;font color=<span class="hljs-subst">\&quot;</span>info<span class="hljs-subst">\&quot;</span>&gt;广州TIT 1楼 301&lt;/font&gt;  <span class="hljs-subst">\n</span>&gt;日　期：&lt;font color=<span class="hljs-subst">\&quot;</span>warning<span class="hljs-subst">\&quot;</span>&gt;2018年5月18日&lt;/font&gt;  <span class="hljs-subst">\n</span>&gt;时　间：&lt;font color=<span class="hljs-subst">\&quot;</span>comment<span class="hljs-subst">\&quot;</span>&gt;上午9:00-11:00&lt;/font&gt;  <span class="hljs-subst">\n</span>&gt;  <span class="hljs-subst">\n</span>&gt;请准时参加会议。  <span class="hljs-subst">\n</span>&gt;  <span class="hljs-subst">\n</span>&gt;如需修改会议信息，请点击：[修改会议信息](https://work.weixin.qq.com)&quot;</span><br>   &#125;,<br>   <span class="hljs-string">&quot;enable_duplicate_check&quot;</span>: <span class="hljs-number">0</span>,<br>   <span class="hljs-string">&quot;duplicate_check_interval&quot;</span>: <span class="hljs-number">1800</span><br>&#125;<br></code></pre></td></tr></table></figure>

<p>示例效果：<br><img src="https://self-bucket-1258377547.cos.ap-shanghai.myqcloud.com/picgo-test/20240410144317.png" srcset="/img/loading.gif" lazyload alt="示例效果"></p>
<p>通过对企业微信消息推送功能的细致分析，我们可以看到其在多样化的消息类型、精准的推送策略以及严格的安全与权限管理上的优势。这些细节的设计和实现，共同构成了企业微信高效沟通的基石。现在，就让我们一起加入企业微信，体验这些细节带来的沟通革命吧！</p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E5%B7%A5%E5%85%B7/" class="category-chain-item">工具</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/%E5%B7%A5%E5%85%B7/" class="print-no-link">#工具</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>企业微信消息推送全攻略-从文本到多媒体，一文读懂高效沟通秘诀</div>
      <div>http://blog.xhweng.cn/2024/04/10/企业微信消息推送全攻略：从文本到多媒体，一文读懂高效沟通秘诀/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>xuehaoweng</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2024年4月10日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2024/04/16/telemetry_quick/" title="Telemetry快速入门">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">Telemetry快速入门</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2024/04/02/%E6%95%B0%E6%8D%AE%E4%B8%AD%E5%8F%B0%E6%B7%B1%E5%BA%A6%E8%A7%A3%E6%9E%90%EF%BC%9A%E4%BC%81%E4%B8%9A%E6%95%B0%E5%AD%97%E5%8C%96%E8%BD%AC%E5%9E%8B%E7%9A%84%E6%96%B0%E5%8A%A8%E5%8A%9B/" title="数据中台深度解析：企业数字化转型的新动力">
                        <span class="hidden-mobile">数据中台深度解析：企业数字化转型的新动力</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
    <div class="statistics">
  
  

  
    
      <span id="busuanzi_container_site_pv" style="display: none">
        总访问量 
        <span id="busuanzi_value_site_pv"></span>
         次
      </span>
    
    
      <span id="busuanzi_container_site_uv" style="display: none">
        总访客数 
        <span id="busuanzi_value_site_uv"></span>
         人
      </span>
    
    
  
</div>

  
  
    <!-- 备案信息 ICP for China -->
    <div class="beian">
  <span>
    <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
      皖ICP备2024038809号-2
    </a>
  </span>
  
    
      <span>
        <a
          href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12345678"
          rel="nofollow noopener"
          class="beian-police"
          target="_blank"
        >
          
            <span style="visibility: hidden; width: 0">|</span>
            <img src="/img/police_beian.png" srcset="/img/loading.gif" lazyload alt="police-icon"/>
          
          <span>京公网安备12345678号</span>
        </a>
      </span>
    
  
</div>

  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.4/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.20.1/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>

  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
